$(document).ready(function () {


	resetToDefault();

	//导航栏中的大类被点击的效果.
	$('#header_ul li a').click(function () {
		$('#header_ul li a')
			.css("color", "#757575").css("font-weight", "normal");
		$(this)
			.css("color", "#424242")
			.css("font-weight", "bold");

	});

	// 鼠标经过时
	var categoryUI = $("#header_subcategories");
	$('#header_ul li a').mouseover(function () {
		var offset = $(this).offset();
		$(categoryUI).css("top", offset.top > 100 ? 50 : 100);
		$(categoryUI).show();
	});

	$("#headerContainer").mouseleave(function () {
		$(categoryUI).hide();
	});



	// 同步 sort by 的内容
	$('.dropdown-menu li a').click(function () {
		$('#dropdownMenu_title').text($(this).text());
	});

	$('.content_item').click(function () {
		window.location.href = "detail.html";
	});


	//顶部导航栏默认选中 necklace
	function resetToDefault() {
		var element = $('#header_ul li a').eq(3);
		$(element).css("color", "#424242")
			.css("font-weight", "bold");
	}




});
